In [1]:
# Importing the libraries
import numpy as np
import pandas as pd
import datetime
import seaborn as sns
import matplotlib.pyplot as plt
In [2]:
df = pd.read_csv("/home/z/Downloads/EduSurvey032920.csv", names=["Security Role", 
               "Highest Formal Ed", 
               "Multiple Degrees",
               "Degree Earned",
               "Related Degree",
               "Degree Fields", 
               "Degree Origin",
               "Degree Gatekeeping", 
               "Degrees Required", 
               "Certifications", 
               "Certifications (Non Security)", 
               "Self Training Method", 
               "Age Range", 
               "Gender Identity", 
               "Race and Ethnic Identity", 
               "Years in Security", 
               "Years in Tech", 
               "Country of Origin", 
               "Country of Residence"])
In [3]:
df=df.drop(df.index[0])
In [4]:
df.describe()
Out[4]:
Security Role Highest Formal Ed Multiple Degrees Degree Earned Related Degree Degree Fields Degree Origin Degree Gatekeeping Degrees Required Certifications Certifications (Non Security) Self Training Method Age Range Gender Identity Race and Ethnic Identity Years in Security Years in Tech Country of Origin Country of Residence
count 438 438 324 324 324 304 313 114 429 438 438 438 436 435 419 438 438 425 425
unique 15 13 3 7 4 256 39 14 10 148 103 95 5 7 11 8 7 44 39
top Yes Bachelors I have multiple degrees Before entering the information/cyber security... Yes, degree(s) in security or related field(s) Computer Science USA Yes Not involved in hiring or recruiting requirements No Certifications No Certifications Built a home lab;Participated in Capture the F... 36 to 45 Male Caucasian / White 11 to 15 years Over 20 years USA USA
freq 338 141 160 191 170 19 238 54 199 136 181 103 168 359 369 92 188 314 325
In [5]:
plt.figure(figsize=(10,4))
plot = sns.countplot(x="Security Role",data=df, palette="coolwarm")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
<ipython-input-5-61509bb15f55>:4: UserWarning: Tight layout not applied. The bottom and top margins cannot be made large enough to accommodate all axes decorations. 
  plt.tight_layout()
In [6]:
plt.figure(figsize=(10,10))
plot = sns.countplot(x="Highest Formal Ed",data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
In [7]:
plt.figure(figsize=(10,4))
plot = sns.countplot(x="Multiple Degrees",data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
In [8]:
plt.figure(figsize=(10,4))
plot = sns.countplot(x="Degree Earned",data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
<ipython-input-8-00bcd630719a>:4: UserWarning: Tight layout not applied. The bottom and top margins cannot be made large enough to accommodate all axes decorations. 
  plt.tight_layout()
In [9]:
plt.figure(figsize=(10,4))
title = "Related Degree"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
<ipython-input-9-4fde600b2aa1>:5: UserWarning: Tight layout not applied. The bottom and top margins cannot be made large enough to accommodate all axes decorations. 
  plt.tight_layout()
In [10]:
# View image separately
plt.figure(figsize=(100,100))
title = "Degree Fields"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
In [11]:
plt.figure(figsize=(10,4))
title = "Degree Origin"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
In [12]:
plt.figure(figsize=(10,4))
title = "Degree Gatekeeping"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
<ipython-input-12-dac37cb36d88>:5: UserWarning: Tight layout not applied. The bottom and top margins cannot be made large enough to accommodate all axes decorations. 
  plt.tight_layout()
In [13]:
plt.figure(figsize=(10,4))
title = "Degrees Required"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
<ipython-input-13-b2990eca7cdc>:5: UserWarning: Tight layout not applied. The bottom and top margins cannot be made large enough to accommodate all axes decorations. 
  plt.tight_layout()
In [14]:
plt.figure(figsize=(100,100))
title = "Certifications"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
In [15]:
plt.figure(figsize=(100,100))
title = "Certifications (Non Security)"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
/home/z/Python/scikit/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py:214: RuntimeWarning: Glyph 143 missing from current font.
  font.set_text(s, 0.0, flags=flags)
/home/z/Python/scikit/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py:183: RuntimeWarning: Glyph 143 missing from current font.
  font.set_text(s, 0, flags=flags)
In [16]:
plt.figure(figsize=(100,100))
title = "Self Training Method"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
In [17]:
plt.figure(figsize=(10,4))
title = "Age Range"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
In [18]:
plt.figure(figsize=(10,4))
title = "Gender Identity"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
<ipython-input-18-2dfa8758a1a4>:5: UserWarning: Tight layout not applied. The bottom and top margins cannot be made large enough to accommodate all axes decorations. 
  plt.tight_layout()
In [19]:
plt.figure(figsize=(10,10))
title = "Race and Ethnic Identity"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
In [20]:
plt.figure(figsize=(10,4))
title = "Years in Security"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
In [21]:
plt.figure(figsize=(10,4))
title = "Years in Tech"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
In [22]:
plt.figure(figsize=(10,4))
title = "Country of Origin"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
In [23]:
plt.figure(figsize=(10,4))
title = "Country of Residence"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
In [ ]:
 
In [ ]: